package cn.edu.buaa.cnsatm.traffic_big_data_server.util;

import org.springframework.core.io.support.PropertiesLoaderUtils;

import java.io.IOException;
import java.util.Properties;
/**
 * @author:  LX&&tianwang
 * @description:仅用于读取配置文件
 * @date:2019/10/11
 */
public class PropertiesUtil {
    public static Properties properties;
    public static Properties smdictionary;
    public static void setProperties(){
        try{
            properties = PropertiesLoaderUtils.loadAllProperties("application.properties");
            smdictionary = PropertiesLoaderUtils.loadAllProperties("smdictionary.properties");
        }catch(IOException e){
            e.printStackTrace();
            properties = null;
            smdictionary = null;
            System.out.println("配置文件读取失败");
        }
    }
}
